#pragma once
#ifndef _UVM_HDL_H
#define _UVM_HDL_H
#include "sv_vpi_user.h"
#include "veriuser.h"
#include "svdpi.h"
#include <malloc.h>
#include <string.h>
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

#ifdef VCSMX
#include <svdpi.h>
#include <vcsuser.h>
#include <mhpi_user.h>
#include <vhpi_user.h>
#endif

#ifdef VCSMX
#define RELEASE_HANDLE(h, mhpiH)\
     vpi_release_handle(h); \
     mhpi_release_handle(mhpiH);
#else
#define RELEASE_HANDLE(h, mhpiH)\
     vpi_release_handle(h); 
#endif
#if defined(VCSMX_FAST_UVM) && !defined(MHPI_FAST_UVM) 
#error "UVM_ERROR! THIS VERSION OF VCS DOSEN'T SUPPORT VCSMX_FAST_UVM. Compile without -DVCSMX_FAST_UVM"
#endif

extern int uvm_hdl_read(char *path, p_vpi_vecval value);
extern uint32_t sc_hdl_read(char* path);
extern void sc_hdl_force(char* path, uint32_t value);
extern void sc_hdl_release(char* path);
#endif
